package com.xing.zrtest;

import java.math.BigDecimal;

/**
 * @Author: ljx
 * @Date: 2021-05-12 14:33
 */
public class TestSharding {

//    public static void main(String[] args) {
//        String uid = "c7347c7f-8f43-4792-989e-6f61968421c7";
//        System.out.println("tableMod:" + uid.hashCode() % 128);
//        System.out.println("dbMod:" + uid.hashCode() % 6);
//    }
//

    public static void main(String[] args) {
        String uid = "1dd56f3d-78b1-4254-a4d0-0d6d318bc591";
        System.out.println(uid.hashCode());
        System.out.println("tableMod:" + uid.hashCode() % 128);
        System.out.println("dbMod:" + uid.hashCode() % 6);

        double f = 1/100d;
        System.out.println(f);

        double v = new BigDecimal(f).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
        System.out.println(v);

        Byte ss = 1;
        System.out.println(1 == ss);
    }
}
